#ifndef _MY_GPIO_H_
#define _MY_GPIO_H_
#include <rtthread.h>
#include <board.h>
#include <rtdevice.h>
#include <stm32f1xx_hal_gpio.h>

#define LED0_PIN    GET_PIN(B, 13)

#define LED_PORT   GPIOB
#define GPIO_PIN_LED0   GPIO_PIN_13

#define LED0_OFF()      do{rt_pin_write(LED0_PIN,PIN_LOW);}while(0)
#define LED0_ON()       do{rt_pin_write(LED0_PIN, PIN_HIGH);}while(0)
#define LED0_TOGGLE()   do{HAL_GPIO_TogglePin(LED_PORT,GPIO_PIN_LED0);}while(0)


extern void led_init(void);

#endif
